#define _CRT_SECURE_NO_WARNINGS
#include"vector.h"
#include<list>
using namespace std;

namespace my_vector
{
	void test1()
	{
		vector<int> v1;
		v1.push_back(5);
		v1.push_back(5);
		v1.push_back(5);
		v1.push_back(5);
		v1.push_back(5);

		vector<std::string> v2(10, "111");
		v2[6] = "555";
		v2.push_back("666");

		vector<std::string> v3 = v2;
		vector<std::string> v4(5, "33");
		//v4 = v2;

	}

	void test2()
	{
		/*vector<int> v1(10, 1);
		vector<int> v2(5, 2);

		v2 = v1;*/

		vector<std::string> v1(10, "111");
		vector<std::string> v2;

		v2 = v1;
		
	}

	void test3()
	{
		/*vector<int> v1(10, 1);
		v1.resize(5, 2);
		v1.push_back(6);
		v1.push_back(7);
		v1.push_back(8);
		v1.resize(18, 2);*/

		vector<int> v1(3, 1);
		vector<vector<int>> v2(5, v1);
		v2.resize(3);
		v2.push_back(vector<int>(6, 6));
		vector<int> v3(7, 5);
		v2.resize(10, v3);
	}

	void test4()
	{
		vector<std::string> v1;
		v1.push_back("1");
		v1.push_back("2");
		v1.push_back("3");
		v1.push_back("4");
		v1.push_back("5");
		v1.push_back("6");

		/*v1.insert(v1.end(), "20");

		v1.erase(v1.end() - 1);
		v1.push_back("1");*/

		vector<std::string> v2(v1.begin(), v1.end());

	}

	void test5()
	{
		//std::list<std::string> lt = { "1","2","3","4","5","6","7","8" };
		//vector<std::string> v1(lt.begin(), lt.end());
		vector<int> v1(4, 1);
		v1.insert(v1.begin() + 2, 2);

		print_vector(v1);
	}

	void test6()
	{
		list<int> l1;
		l1.push_back(1);
		l1.push_back(2);
		l1.push_back(3);
		l1.push_back(4);
		l1.push_back(5);
		l1.push_back(6);

		vector<int> v1(++l1.begin(), --l1.end());
		print_vector(v1);
	}

	void test7()
	{
		vector<int> v(10, 1);
		print_container(v);
	}
}



int main()
{
	//std::cout << "hehe";

	my_vector::test7();

	/*char* p = nullptr;
	delete p;*/
	return 0;
}